﻿/*
    Kóði fyrir tímalínu tekur við age, OtherInfo, LineDate og Year og skrifar í html auk þess að breyta barna Iconi
*/

function GoToTime(age, text, date, year) {
    viewPic(age);

    writeText(text, date, year); //, title)
}
function ClearText() {
    writeText('', '', '');
}
function viewPic(age) {
        
    switch(age) {
        case '0':
            document.babyIcon.src = "/Content/images/infant.png";
            break;
        case '1':
            document.babyIcon.src = "/Content/images/baby1.png";
            break;
        default:
            document.babyIcon.src = "/Content/images/baby2.png";
            break;
    }

}
function writeText(text, date, year) {
    document.getElementById("timelineText").innerHTML = text;
    document.getElementById("timelineDate").innerHTML = date;
    document.getElementById("timelineYear").innerHTML = year;
       

}
